| 
                
               | 
              
                
               | 
              
                @@ -478,13 +478,9 @@ def activity_group_share(request): 
               | 
            
            
            
              | 
                478
               | 
              
                478
               | 
              
                     isOffline = act.activity_state != 0 or act.final_state == '已结束' 
               | 
            
            
            
              | 
                479
               | 
              
                479
               | 
              
                  
               | 
            
            
            
              | 
                480
               | 
              
                480
               | 
              
                     # 判断是否给积分 & 给多少积分 
               | 
            
            
            
              | 
                481
               | 
              
                
               | 
              
                -    if isOffline: 
               | 
            
            
            
              | 
                482
               | 
              
                
               | 
              
                -        is_integral = False 
               | 
            
            
            
              | 
                483
               | 
              
                
               | 
              
                -        integral = 0 
               | 
            
            
            
              | 
                484
               | 
              
                
               | 
              
                -    else: 
               | 
            
            
            
              | 
                485
               | 
              
                
               | 
              
                -        is_integral, integral = get_group_share_info_integral(act.activity_id, share_user_id, open_gid, act.group_share_integral, act.group_share_max_integral) 
               | 
            
            
            
              | 
                486
               | 
              
                
               | 
              
                -        user.integral += integral 
               | 
            
            
            
              | 
                487
               | 
              
                
               | 
              
                -        user.save() 
               | 
            
            
            
              | 
                
               | 
              
                481
               | 
              
                +    is_integral, integral = get_group_share_info_integral(act.activity_id, share_user_id, open_gid, act.group_share_integral, act.group_share_max_integral) 
               | 
            
            
            
              | 
                
               | 
              
                482
               | 
              
                + 
               | 
            
            
            
              | 
                
               | 
              
                483
               | 
              
                +    # 活动未结束,则给用户加积分 
               | 
            
            
            
              | 
                488
               | 
              
                484
               | 
              
                          
               | 
            
            
            
              | 
                489
               | 
              
                485
               | 
              
                     if is_integral: 
               | 
            
            
            
              | 
                490
               | 
              
                486
               | 
              
                         MemberActivityGroupShareInfo.objects.create(**{
               | 
            
            
            
            
            
              | 
                
               | 
              
                
               | 
              
                @@ -496,9 +492,13 @@ def activity_group_share(request): 
               | 
            
            
            
              | 
                496
               | 
              
                492
               | 
              
                             'activity_id': activity_id, 
               | 
            
            
            
              | 
                497
               | 
              
                493
               | 
              
                             'title': act.title, 
               | 
            
            
            
              | 
                498
               | 
              
                494
               | 
              
                             'is_integral': is_integral, 
               | 
            
            
            
              | 
                499
               | 
              
                
               | 
              
                -            'integral': integral, 
               | 
            
            
            
              | 
                
               | 
              
                495
               | 
              
                +            'integral': 0 if isOffline else integral, 
               | 
            
            
            
              | 
                500
               | 
              
                496
               | 
              
                         }) 
               | 
            
            
            
              | 
                501
               | 
              
                497
               | 
              
                  
               | 
            
            
            
              | 
                
               | 
              
                498
               | 
              
                +        if not isOffline: 
               | 
            
            
            
              | 
                
               | 
              
                499
               | 
              
                +            user.integral += integral 
               | 
            
            
            
              | 
                
               | 
              
                500
               | 
              
                +            user.save() 
               | 
            
            
            
              | 
                
               | 
              
                501
               | 
              
                + 
               | 
            
            
            
              | 
                502
               | 
              
                502
               | 
              
                     if isOffline: 
               | 
            
            
            
              | 
                503
               | 
              
                503
               | 
              
                         return response(400002, 'Activity has been offline', '会员活动已下线') 
               | 
            
            
            
              | 
                504
               | 
              
                504
               | 
              
                  
               |